<?php
require_once "config.php";
require_once "includeFunctions.php";
require_once "filter.php";
require_once "GoogleAPI.php";

$googleAPI = new GoogleAPI();
$word_strip = strip_punctuation(urldecode($_POST['words']));
if(!empty($word_strip)){
	$expand_words = $googleAPI->getExpandWords(str_split_utf8($word_strip));
	echo '<h3>此標題延伸了哪些關鍵字？</h3>';
	foreach($expand_words as $keyword){
		echo '<span><a class="orange" href="moreResults.php?q='.urlencode($keyword).'" target="_blank">'.$keyword.'</a>  |  </span>';	
	}	
}
else{
	echo " ";
}	
	
?>